import request from '@/utils/request'

export function findAppByCurrentUser() {
  return request({
    url: 'api/appMain/findAppByCurrentUser?appSatus=0',
    method: 'get'
  })
}

export function findAllAppByCurrentUser() {
  return request({
    url: 'api/appMain/findAppByCurrentUser',
    method: 'get'
  })
}

export function findNodeByCurrentUser() {
  return request({
    url: 'api/agentDef/findNodeByCurrentUser',
    method: 'get'
  })
}

export function findRunningStateLog(pageIndex) {
  return request({
    url: 'api/appMain/findRunningLogByCurrentUser?pageIndex=' + pageIndex,
    method: 'post'
  })
}

export function findRunningInfByCurrentUser(bizDate) {
  return request({
    url: 'api/appMain/findRunningInfByCurrentUser?bizDate=' + bizDate,
    method: 'post'
  })
}

export function findTaskRunningLog() {
  return request({
    url: 'api/appMain/findTaskRunningLog',
    method: 'get'
  })
}

export function findAllJobInfByCurrentUser() {
  return request({
    url: 'api/ram/findAllJobInfByCurrentUser',
    method: 'get'
  })
}

export function findPeriodTaskCountTopDataNotApp() {
  return request({
    url: 'api/ram/findPeriodTaskCountTopDataNotApp',
    method: 'get'
  })
}

export function findCronTaskCountTopDataNotApp() {
  return request({
    url: 'api/ram/findCronTaskCountTopDataNotApp',
    method: 'get'
  })
}

export default { findAppByCurrentUser, findNodeByCurrentUser, findRunningStateLog,
  findRunningInfByCurrentUser, findTaskRunningLog, findAllJobInfByCurrentUser,
  findCronTaskCountTopDataNotApp, findPeriodTaskCountTopDataNotApp, findAllAppByCurrentUser }
